3.1.60 \(\int \frac {x^2 (A+B x^2)}{a+b x^2} \, dx\)

Optimal. Leaf size=58 \[ -\frac {\sqrt {a} (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{5/2}}+\frac {x (A b-a B)}{b^2}+\frac {B x^3}{3 b} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {459, 321, 205} \begin {gather*} \frac {x (A b-a B)}{b^2}-\frac {\sqrt {a} (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{5/2}}+\frac {B x^3}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(A + B*x^2))/(a + b*x^2),x]

[Out]

((A*b - a*B)*x)/b^2 + (B*x^3)/(3*b) - (Sqrt[a]*(A*b - a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 459

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(b*e*(m + n*(p + 1) + 1)), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rubi steps

\begin {align*} \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2} \, dx &=\frac {B x^3}{3 b}-\frac {(-3 A b+3 a B) \int \frac {x^2}{a+b x^2} \, dx}{3 b}\\ &=\frac {(A b-a B) x}{b^2}+\frac {B x^3}{3 b}-\frac {(a (A b-a B)) \int \frac {1}{a+b x^2} \, dx}{b^2}\\ &=\frac {(A b-a B) x}{b^2}+\frac {B x^3}{3 b}-\frac {\sqrt {a} (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 57, normalized size = 0.98 \begin {gather*} \frac {\sqrt {a} (a B-A b) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{5/2}}+\frac {x (A b-a B)}{b^2}+\frac {B x^3}{3 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(A + B*x^2))/(a + b*x^2),x]

[Out]

((A*b - a*B)*x)/b^2 + (B*x^3)/(3*b) + (Sqrt[a]*(-(A*b) + a*B)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x^2*(A + B*x^2))/(a + b*x^2),x]

[Out]

IntegrateAlgebraic[(x^2*(A + B*x^2))/(a + b*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 129, normalized size = 2.22 \begin {gather*} \left [\frac {2 \, B b x^{3} - 3 \, {\left (B a - A b\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} - 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) - 6 \, {\left (B a - A b\right )} x}{6 \, b^{2}}, \frac {B b x^{3} + 3 \, {\left (B a - A b\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - 3 \, {\left (B a - A b\right )} x}{3 \, b^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/6*(2*B*b*x^3 - 3*(B*a - A*b)*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-a/b) - a)/(b*x^2 + a)) - 6*(B*a - A*b)*x)/
b^2, 1/3*(B*b*x^3 + 3*(B*a - A*b)*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) - 3*(B*a - A*b)*x)/b^2]

________________________________________________________________________________________

giac [A]  time = 0.39, size = 57, normalized size = 0.98 \begin {gather*} \frac {{\left (B a^{2} - A a b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {B b^{2} x^{3} - 3 \, B a b x + 3 \, A b^{2} x}{3 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a),x, algorithm="giac")

[Out]

(B*a^2 - A*a*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(B*b^2*x^3 - 3*B*a*b*x + 3*A*b^2*x)/b^3

________________________________________________________________________________________

maple [A]  time = 0.00, size = 68, normalized size = 1.17 \begin {gather*} \frac {B \,x^{3}}{3 b}-\frac {A a \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b}+\frac {B \,a^{2} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{2}}+\frac {A x}{b}-\frac {B a x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(B*x^2+A)/(b*x^2+a),x)

[Out]

1/3*B*x^3/b+1/b*A*x-1/b^2*B*a*x-a/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*A+a^2/b^2/(a*b)^(1/2)*arctan(1/(a*b)
^(1/2)*b*x)*B

________________________________________________________________________________________

maxima [A]  time = 2.23, size = 53, normalized size = 0.91 \begin {gather*} \frac {{\left (B a^{2} - A a b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {B b x^{3} - 3 \, {\left (B a - A b\right )} x}{3 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a),x, algorithm="maxima")

[Out]

(B*a^2 - A*a*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(B*b*x^3 - 3*(B*a - A*b)*x)/b^2

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 70, normalized size = 1.21 \begin {gather*} x\,\left (\frac {A}{b}-\frac {B\,a}{b^2}\right )+\frac {B\,x^3}{3\,b}+\frac {\sqrt {a}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\sqrt {b}\,x\,\left (A\,b-B\,a\right )}{B\,a^2-A\,a\,b}\right )\,\left (A\,b-B\,a\right )}{b^{5/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(A + B*x^2))/(a + b*x^2),x)

[Out]

x*(A/b - (B*a)/b^2) + (B*x^3)/(3*b) + (a^(1/2)*atan((a^(1/2)*b^(1/2)*x*(A*b - B*a))/(B*a^2 - A*a*b))*(A*b - B*
a))/b^(5/2)

________________________________________________________________________________________

sympy [A]  time = 0.33, size = 90, normalized size = 1.55 \begin {gather*} \frac {B x^{3}}{3 b} + x \left (\frac {A}{b} - \frac {B a}{b^{2}}\right ) - \frac {\sqrt {- \frac {a}{b^{5}}} \left (- A b + B a\right ) \log {\left (- b^{2} \sqrt {- \frac {a}{b^{5}}} + x \right )}}{2} + \frac {\sqrt {- \frac {a}{b^{5}}} \left (- A b + B a\right ) \log {\left (b^{2} \sqrt {- \frac {a}{b^{5}}} + x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(B*x**2+A)/(b*x**2+a),x)

[Out]

B*x**3/(3*b) + x*(A/b - B*a/b**2) - sqrt(-a/b**5)*(-A*b + B*a)*log(-b**2*sqrt(-a/b**5) + x)/2 + sqrt(-a/b**5)*
(-A*b + B*a)*log(b**2*sqrt(-a/b**5) + x)/2

________________________________________________________________________________________